/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kogent.ejb;

import java.util.ArrayList;
import java.util.Collection;
import javax.annotation.PostConstruct;
import javax.ejb.Stateless;

/**
 *
 * @author IK
 */
@Stateless
public class CartBean implements CartBeanRemote {

    private ArrayList items;

    @PostConstruct
    public void initialize() {
        items = new ArrayList();
    }

    @SuppressWarnings("unchecked")
    @Override
    public void addItem(String item) {
        items.add(item);
    }

    @Override
    public void removeItem(String item) {
        items.remove(item);
    }

    @Override
    public Collection getItems() {
        return items;
    }
}
